<?php
declare (strict_types=1);

namespace app\api\listener;

class ApiLangListener
{
    // 行为扩展的执行入口必须是run
    public function handle()
    {
        $app = app();
        $langSet = $app->lang->getLangSet();
        $langFile = $app->getAppPath() . 'lang' . DIRECTORY_SEPARATOR . $langSet . '.php';
        $app->lang->load($langFile);
    }
}
